Ext.namespace("eddy.ms.CommonWin"); 
eddy.ms.CommonWin = function(config) {
	this.id = arguments[0];
	this.iconCls = arguments[1];
	this.title = arguments[2];
	this.url = arguments[3];
	this.resourceId = arguments[4];
	//this.launcher.cls = 'menuCls';
	eddy.ms.CommonWin.superclass.constructor.apply(this, arguments);
};

Ext.extend(eddy.ms.CommonWin, Ext.app.Module, {
	id:this.id,
    init : function(src){
        this.launcher = {
            text: this.title,
            iconCls:this.iconCls,
            handler : this.createWindow,
            scope: this
        }
    },
    
	createWindow : function(){
		var desktop = MyDesktop.getDesktop();
	    var win = desktop.getWindow(this.id);
	    if(!win){
	    	 win = desktop.createWindow({
                id: this.id,
                title: this.title,
                width:800,
                height:400,
                iconCls: this.iconCls,
                shim:false,
                animCollapse:false,
                constrainHeader:true,
                layout: 'fit',
                html: '<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="' + this.url + '"></iframe>'
	    	 })
	    }
	    win.show();
	}
});